package com.example.demo.mapper;

import com.example.demo.model.ArticleInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface ArticleInfoMapper {

    @Select("select ta.*, tb.username, tb.gender, tb.age, tb.phone " +
            "from articleinfo ta left join userinfo tb " +
            "on ta.uid = tb.id " +
            "where tb.id = #{id}")
    ArticleInfo queryArticleInfo(Integer id);

}
